.class public Llt/farmis/libraries/notificationcontroller/NotificationController;
.super Ljava/lang/Object;
.source "NotificationController.java"


# static fields
.field public static final TAG:Ljava/lang/String; = "NotificationController"


# instance fields
.field protected mContext:Landroid/content/Context;

.field protected mHandler:Landroid/os/Handler;

.field protected mNotificationManager:Landroidx/core/app/NotificationManagerCompat;

.field protected mSettings:Llt/farmis/libraries/notificationcontroller/NotificationControllerSettings;


# direct methods
.method protected constructor <init>(Landroid/content/Context;)V
    .locals 4

    .line 129
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    .line 130
    iput-object p1, p0, Llt/farmis/libraries/notificationcontroller/NotificationController;->mContext:Landroid/content/Context;

    .line 131
    invoke-static {p1}, Landroidx/core/app/NotificationManagerCompat;->from(Landroid/content/Context;)Landroidx/core/app/NotificationManagerCompat;

    move-result-object v0

    iput-object v0, p0, Llt/farmis/libraries/notificationcontroller/NotificationController;->mNotificationManager:Landroidx/core/app/NotificationManagerCompat;

    .line 134
    sget v0, Landroid/os/Build$VERSION;->SDK_INT:I

    const/16 v1, 0x1a

    if-lt v0, v1, :cond_0

    .line 135
    new-instance v0, Landroid/app/NotificationChannel;

    sget v1, Llt/farmis/libraries/notificationcontroller/R$string;->notification_ads_group:I

    .line 136
    invoke-virtual {p1, v1}, Landroid/content/Context;->getString(I)Ljava/lang/String;

    move-result-object v1

    const/4 v2, 0x3

    const-string v3, "ads_channel"

    invoke-direct {v0, v3, v1, v2}, Landroid/app/NotificationChannel;-><init>(Ljava/lang/String;Ljava/lang/CharSequence;I)V

    .line 138
    sget v1, Llt/farmis/libraries/notificationcontroller/R$color;->notification_blue:I

    invoke-static {p1, v1}, Landroidx/core/content/ContextCompat;->getColor(Landroid/content/Context;I)I

    move-result v1

    invoke-virtual {v0, v1}, Landroid/app/NotificationChannel;->setLightColor(I)V

    const-string v1, "notification"

    .line 140
    invoke-virtual {p1, v1}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;

    move-result-object p1

    check-cast p1, Landroid/app/NotificationManager;

    .line 141
    invoke-virtual {p1, v0}, Landroid/app/NotificationManager;->createNotificationChannel(Landroid/app/NotificationChannel;)V

    :cond_0
    return-void
.end method

.method public static with(Landroid/content/Context;)Llt/farmis/libraries/notificationcontroller/NotificationController;
    .locals 1

    .line 112
    new-instance v0, Llt/farmis/libraries/notificationcontroller/NotificationController;

    invoke-direct {v0, p0}, Llt/farmis/libraries/notificationcontroller/NotificationController;-><init>(Landroid/content/Context;)V

    return-object v0
.end method


# virtual methods
.method protected cancelActiveNotifications(Ljava/util/List;)V
    .locals 2
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "<N:",
            "Llt/farmis/libraries/notificationcontroller/data/models/BaseNotificationModel;",
            ">(",
            "Ljava/util/List<",
            "TN;>;)V"
        }
    .end annotation

    .line 923
    invoke-virtual {p0}, Llt/farmis/libraries/notificationcontroller/NotificationController;->getHandler()Landroid/os/Handler;

    move-result-object v0

    new-instance v1, Llt/farmis/libraries/notificationcontroller/NotificationController$2;

    invoke-direct {v1, p0, p1}, Llt/farmis/libraries/notificationcontroller/NotificationController$2;-><init>(Llt/farmis/libraries/notificationcontroller/NotificationController;Ljava/util/List;)V

    invoke-virtual {v0, v1}, Landroid/os/Handler;->post(Ljava/lang/Runnable;)Z

    return-void
.end method

.method protected createNotificationContentPendingIntent(Llt/farmis/libraries/notificationcontroller/data/models/BaseNotificationModel;)Landroid/app/PendingIntent;
    .locals 3
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "<N:",
            "Llt/farmis/libraries/notificationcontroller/data/models/BaseNotificationModel;",
            ">(TN;)",
            "Landroid/app/PendingIntent;"
        }
    .end annotation

    .line 960
    new-instance v0, Landroid/content/Intent;

    const-string v1, "lt.farmis.libraries.notificationcontroller.notification.OPEN"

    invoke-direct {v0, v1}, Landroid/content/Intent;-><init>(Ljava/lang/String;)V

    const-string v1, "key_notification"

    .line 963
    invoke-virtual {v0, v1, p1}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Landroid/os/Parcelable;)Landroid/content/Intent;

    .line 967
    invoke-virtual {p1}, Llt/farmis/libraries/notificationcontroller/data/models/BaseNotificationModel;->getUsableID()I

    move-result p1

    .line 970
    iget-object v1, p0, Llt/farmis/libraries/notificationcontroller/NotificationController;->mContext:Landroid/content/Context;

    invoke-virtual {v1}, Landroid/content/Context;->getApplicationContext()Landroid/content/Context;

    move-result-object v1

    const/high16 v2, 0x8000000

    invoke-static {v1, p1, v0, v2}, Landroid/app/PendingIntent;->getBroadcast(Landroid/content/Context;ILandroid/content/Intent;I)Landroid/app/PendingIntent;

    move-result-object p1

    return-object p1
.end method

.method protected createNotificationDeletePendingIntent(Ljava/util/List;)Landroid/app/PendingIntent;
    .locals 3
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "<N:",
            "Llt/farmis/libraries/notificationcontroller/data/models/BaseNotificationModel;",
            ">(",
            "Ljava/util/List<",
            "TN;>;)",
            "Landroid/app/PendingIntent;"
        }
    .end annotation

    .line 1008
    new-instance v0, Landroid/content/Intent;

    const-string v1, "lt.farmis.libraries.notificationcontroller.notification.DELETE"

    invoke-direct {v0, v1}, Landroid/content/Intent;-><init>(Ljava/lang/String;)V

    .line 1011
    new-instance v1, Ljava/util/ArrayList;

    invoke-direct {v1, p1}, Ljava/util/ArrayList;-><init>(Ljava/util/Collection;)V

    const-string p1, "key_notifications"

    .line 1025
    invoke-virtual {v0, p1, v1}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Ljava/io/Serializable;)Landroid/content/Intent;

    .line 1028
    invoke-static {}, Llt/farmis/libraries/notificationcontroller/utilities/NotificationUtilities;->generatePseudoID()I

    move-result p1

    .line 1031
    iget-object v1, p0, Llt/farmis/libraries/notificationcontroller/NotificationController;->mContext:Landroid/content/Context;

    invoke-virtual {v1}, Landroid/content/Context;->getApplicationContext()Landroid/content/Context;

    move-result-object v1

    const/high16 v2, 0x8000000

    invoke-static {v1, p1, v0, v2}, Landroid/app/PendingIntent;->getBroadcast(Landroid/content/Context;ILandroid/content/Intent;I)Landroid/app/PendingIntent;

    move-result-object p1

    return-object p1
.end method

.method protected createNotificationDeletePendingIntent(Llt/farmis/libraries/notificationcontroller/data/models/BaseNotificationModel;)Landroid/app/PendingIntent;
    .locals 2
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "<N:",
            "Llt/farmis/libraries/notificationcontroller/data/models/BaseNotificationModel;",
            ">(TN;)",
            "Landroid/app/PendingIntent;"
        }
    .end annotation

    const/4 v0, 0x1

    .line 990
    new-array v0, v0, [Llt/farmis/libraries/notificationcontroller/data/models/BaseNotificationModel;

    const/4 v1, 0x0

    aput-object p1, v0, v1

    invoke-static {v0}, Ljava/util/Arrays;->asList([Ljava/lang/Object;)Ljava/util/List;

    move-result-object p1

    invoke-virtual {p0, p1}, Llt/farmis/libraries/notificationcontroller/NotificationController;->createNotificationDeletePendingIntent(Ljava/util/List;)Landroid/app/PendingIntent;

    move-result-object p1

    return-object p1
.end method

.method protected createSummaryNotificationContentPendingIntent(Ljava/util/List;)Landroid/app/PendingIntent;
    .locals 3
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "<N:",
            "Llt/farmis/libraries/notificationcontroller/data/models/BaseNotificationModel;",
            ">(",
            "Ljava/util/List<",
            "TN;>;)",
            "Landroid/app/PendingIntent;"
        }
    .end annotation

    .line 1069
    new-instance v0, Landroid/content/Intent;

    const-string v1, "lt.farmis.libraries.notificationcontroller.notification.SUMMARY_OPEN"

    invoke-direct {v0, v1}, Landroid/content/Intent;-><init>(Ljava/lang/String;)V

    .line 1072
    new-instance v1, Ljava/util/ArrayList;

    invoke-direct {v1, p1}, Ljava/util/ArrayList;-><init>(Ljava/util/Collection;)V

    const-string v2, "key_notifications"

    .line 1086
    invoke-virtual {v0, v2, v1}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Ljava/io/Serializable;)Landroid/content/Intent;

    .line 1090
    invoke-interface {p1}, Ljava/util/List;->isEmpty()Z

    move-result v1

    if-nez v1, :cond_0

    const/4 v1, 0x0

    invoke-interface {p1, v1}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object p1

    check-cast p1, Llt/farmis/libraries/notificationcontroller/data/models/BaseNotificationModel;

    invoke-virtual {p1}, Llt/farmis/libraries/notificationcontroller/data/models/BaseNotificationModel;->getConfiguration()Llt/farmis/libraries/notificationcontroller/data/configurations/NotificationConfiguration;

    move-result-object p1

    invoke-interface {p1}, Llt/farmis/libraries/notificationcontroller/data/configurations/NotificationConfiguration;->obtainSummaryNotificationID()I

    move-result p1

    goto :goto_0

    .line 1091
    :cond_0
    invoke-static {}, Llt/farmis/libraries/notificationcontroller/utilities/NotificationUtilities;->generatePseudoID()I

    move-result p1

    .line 1094
    :goto_0
    iget-object v1, p0, Llt/farmis/libraries/notificationcontroller/NotificationController;->mContext:Landroid/content/Context;

    invoke-virtual {v1}, Landroid/content/Context;->getApplicationContext()Landroid/content/Context;

    move-result-object v1

    const/high16 v2, 0x8000000

    invoke-static {v1, p1, v0, v2}, Landroid/app/PendingIntent;->getBroadcast(Landroid/content/Context;ILandroid/content/Intent;I)Landroid/app/PendingIntent;

    move-result-object p1

    return-object p1
.end method

.method protected getHandler()Landroid/os/Handler;
    .locals 2

    .line 209
    iget-object v0, p0, Llt/farmis/libraries/notificationcontroller/NotificationController;->mHandler:Landroid/os/Handler;

    if-nez v0, :cond_0

    .line 212
    new-instance v0, Landroid/os/HandlerThread;

    invoke-virtual {p0}, Llt/farmis/libraries/notificationcontroller/NotificationController;->getSettings()Llt/farmis/libraries/notificationcontroller/NotificationControllerSettings;

    move-result-object v1

    invoke-virtual {v1}, Llt/farmis/libraries/notificationcontroller/NotificationControllerSettings;->getThreadName()Ljava/lang/String;

    move-result-object v1

    invoke-direct {v0, v1}, Landroid/os/HandlerThread;-><init>(Ljava/lang/String;)V

    .line 213
    invoke-virtual {v0}, Landroid/os/HandlerThread;->start()V

    .line 214
    invoke-virtual {v0}, Landroid/os/HandlerThread;->getLooper()Landroid/os/Looper;

    move-result-object v0

    .line 217
    new-instance v1, Landroid/os/Handler;

    invoke-direct {v1, v0}, Landroid/os/Handler;-><init>(Landroid/os/Looper;)V

    iput-object v1, p0, Llt/farmis/libraries/notificationcontroller/NotificationController;->mHandler:Landroid/os/Handler;

    .line 221
    :cond_0
    iget-object v0, p0, Llt/farmis/libraries/notificationcontroller/NotificationController;->mHandler:Landroid/os/Handler;

    return-object v0
.end method

.method protected getSettings()Llt/farmis/libraries/notificationcontroller/NotificationControllerSettings;
    .locals 1

    .line 190
    iget-object v0, p0, Llt/farmis/libraries/notificationcontroller/NotificationController;->mSettings:Llt/farmis/libraries/notificationcontroller/NotificationControllerSettings;

    if-nez v0, :cond_0

    .line 191
    invoke-static {}, Llt/farmis/libraries/notificationcontroller/NotificationControllerSettings;->useDefaultSettings()Llt/farmis/libraries/notificationcontroller/NotificationControllerSettings;

    move-result-object v0

    iput-object v0, p0, Llt/farmis/libraries/notificationcontroller/NotificationController;->mSettings:Llt/farmis/libraries/notificationcontroller/NotificationControllerSettings;

    .line 195
    :cond_0
    iget-object v0, p0, Llt/farmis/libraries/notificationcontroller/NotificationController;->mSettings:Llt/farmis/libraries/notificationcontroller/NotificationControllerSettings;

    return-object v0
.end method

.method public handleNotificationDeleteEvent(Landroid/content/Intent;)V
    .locals 5

    .line 317
    sget-object v0, Llt/farmis/libraries/notificationcontroller/NotificationController;->TAG:Ljava/lang/String;

    const-string v1, "Handling the notification delete event..."

    invoke-static {v0, v1}, Landroid/util/Log;->v(Ljava/lang/String;Ljava/lang/String;)I

    :try_start_0
    const-string v0, "key_notifications"

    .line 322
    invoke-virtual {p1, v0}, Landroid/content/Intent;->getParcelableArrayListExtra(Ljava/lang/String;)Ljava/util/ArrayList;

    move-result-object p1

    if-eqz p1, :cond_3

    .line 325
    invoke-virtual {p1}, Ljava/util/ArrayList;->isEmpty()Z

    move-result v0

    if-nez v0, :cond_3

    .line 333
    invoke-virtual {p1}, Ljava/util/ArrayList;->iterator()Ljava/util/Iterator;

    move-result-object p1

    :cond_0
    :goto_0
    invoke-interface {p1}, Ljava/util/Iterator;->hasNext()Z

    move-result v0

    if-eqz v0, :cond_4

    invoke-interface {p1}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Llt/farmis/libraries/notificationcontroller/data/models/BaseNotificationModel;

    .line 336
    invoke-virtual {v0}, Llt/farmis/libraries/notificationcontroller/data/models/BaseNotificationModel;->getDeliveryFlags()Llt/farmis/libraries/bitflags/BitFlags;

    move-result-object v1

    const/4 v2, 0x1

    invoke-interface {v1, v2}, Llt/farmis/libraries/bitflags/BitFlags;->isSet(I)Z

    move-result v1

    xor-int/2addr v1, v2

    const/4 v2, 0x0

    if-eqz v1, :cond_1

    .line 338
    iget-object v3, p0, Llt/farmis/libraries/notificationcontroller/NotificationController;->mContext:Landroid/content/Context;

    invoke-virtual {v0, v3}, Llt/farmis/libraries/notificationcontroller/data/models/BaseNotificationModel;->getDatabaseWriter(Landroid/content/Context;)Llt/farmis/libraries/notificationcontroller/data/providers/BaseNotificationDataProvider;

    move-result-object v3

    .line 339
    invoke-virtual {v0}, Llt/farmis/libraries/notificationcontroller/data/models/BaseNotificationModel;->getActualID()I

    move-result v4

    invoke-virtual {v3, v4}, Llt/farmis/libraries/notificationcontroller/data/providers/BaseNotificationDataProvider;->setInactive(I)Z

    move-result v3

    goto :goto_1

    :cond_1
    const/4 v3, 0x0

    :goto_1
    if-eqz v1, :cond_2

    if-eqz v3, :cond_0

    .line 346
    :cond_2
    iget-object v1, p0, Llt/farmis/libraries/notificationcontroller/NotificationController;->mContext:Landroid/content/Context;

    invoke-virtual {v0, v1}, Llt/farmis/libraries/notificationcontroller/data/models/BaseNotificationModel;->getCallback(Landroid/content/Context;)Llt/farmis/libraries/notificationcontroller/data/callbacks/NotificationCallback;

    move-result-object v0

    invoke-interface {v0, v2}, Llt/farmis/libraries/notificationcontroller/data/callbacks/NotificationCallback;->onAfterDismissalAction(Z)V

    goto :goto_0

    .line 326
    :cond_3
    sget-object p1, Llt/farmis/libraries/notificationcontroller/NotificationController;->TAG:Ljava/lang/String;

    const-string v0, "Aborting the handling of this event, because the extracted List of notification models is invalid or empty!"

    invoke-static {p1, v0}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;)I

    .line 329
    new-instance p1, Ljava/security/InvalidParameterException;

    const-string v0, "Could not extract a valid List of notification models from the received Intent."

    invoke-direct {p1, v0}, Ljava/security/InvalidParameterException;-><init>(Ljava/lang/String;)V

    throw p1
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    :catch_0
    move-exception p1

    .line 350
    invoke-virtual {p1}, Ljava/lang/Exception;->printStackTrace()V

    .line 351
    sget-object p1, Llt/farmis/libraries/notificationcontroller/NotificationController;->TAG:Ljava/lang/String;

    const-string v0, "Failed to process the deletion/dismissal event of this particular notification..."

    invoke-static {p1, v0}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;)I

    :cond_4
    return-void
.end method

.method public handleNotificationOpenEvent(Landroid/content/Intent;)V
    .locals 5

    .line 238
    sget-object v0, Llt/farmis/libraries/notificationcontroller/NotificationController;->TAG:Ljava/lang/String;

    const-string v1, "Handling the notification open event..."

    invoke-static {v0, v1}, Landroid/util/Log;->v(Ljava/lang/String;Ljava/lang/String;)I

    const/4 v0, 0x0

    :try_start_0
    const-string v1, "key_notification"

    .line 242
    invoke-virtual {p1, v1}, Landroid/content/Intent;->getParcelableExtra(Ljava/lang/String;)Landroid/os/Parcelable;

    move-result-object p1

    check-cast p1, Llt/farmis/libraries/notificationcontroller/data/models/BaseNotificationModel;

    if-eqz p1, :cond_5

    .line 245
    invoke-virtual {p1}, Llt/farmis/libraries/notificationcontroller/data/models/BaseNotificationModel;->isEmpty()Z

    move-result v1

    if-nez v1, :cond_5

    .line 256
    iget-object v1, p0, Llt/farmis/libraries/notificationcontroller/NotificationController;->mContext:Landroid/content/Context;

    invoke-virtual {p1, v1}, Llt/farmis/libraries/notificationcontroller/data/models/BaseNotificationModel;->getCallback(Landroid/content/Context;)Llt/farmis/libraries/notificationcontroller/data/callbacks/NotificationCallback;

    move-result-object v1

    const/4 v2, 0x1

    invoke-interface {v1, v2}, Llt/farmis/libraries/notificationcontroller/data/callbacks/NotificationCallback;->onBeforeDismissalAction(Z)Z

    move-result v1

    if-eqz v1, :cond_0

    .line 257
    invoke-virtual {p1}, Llt/farmis/libraries/notificationcontroller/data/models/BaseNotificationModel;->getDeliveryFlags()Llt/farmis/libraries/bitflags/BitFlags;

    move-result-object v1

    const/4 v3, 0x2

    invoke-interface {v1, v3}, Llt/farmis/libraries/bitflags/BitFlags;->isSet(I)Z

    move-result v1

    if-nez v1, :cond_0

    .line 259
    sget-object p1, Llt/farmis/libraries/notificationcontroller/NotificationController;->TAG:Ljava/lang/String;

    const-string v1, "The event has been consumed and the delivery of the notification is not being forced. The notification should not be opened and the related regular procedures should be cancelled!"

    invoke-static {p1, v1}, Landroid/util/Log;->v(Ljava/lang/String;Ljava/lang/String;)I

    return-void

    .line 267
    :cond_0
    invoke-virtual {p1}, Llt/farmis/libraries/notificationcontroller/data/models/BaseNotificationModel;->getConfiguration()Llt/farmis/libraries/notificationcontroller/data/configurations/NotificationConfiguration;

    move-result-object v1

    iget-object v3, p0, Llt/farmis/libraries/notificationcontroller/NotificationController;->mContext:Landroid/content/Context;

    invoke-interface {v1, v3}, Llt/farmis/libraries/notificationcontroller/data/configurations/NotificationConfiguration;->getOpenIntent(Landroid/content/Context;)Landroid/content/Intent;

    move-result-object v1

    if-nez v1, :cond_2

    .line 269
    sget-object v1, Llt/farmis/libraries/notificationcontroller/NotificationController;->TAG:Ljava/lang/String;

    const-string v3, "The notification open Intent is invalid. Creating the default Intent for the notification List Activity instead..."

    invoke-static {v1, v3}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;)I

    .line 272
    invoke-virtual {p0}, Llt/farmis/libraries/notificationcontroller/NotificationController;->getSettings()Llt/farmis/libraries/notificationcontroller/NotificationControllerSettings;

    move-result-object v1

    invoke-virtual {v1}, Llt/farmis/libraries/notificationcontroller/NotificationControllerSettings;->getFallbackNotificationOpenIntent()Landroid/content/Intent;

    move-result-object v1

    if-eqz v1, :cond_1

    invoke-virtual {p0}, Llt/farmis/libraries/notificationcontroller/NotificationController;->getSettings()Llt/farmis/libraries/notificationcontroller/NotificationControllerSettings;

    move-result-object v1

    invoke-virtual {v1}, Llt/farmis/libraries/notificationcontroller/NotificationControllerSettings;->getFallbackNotificationOpenIntent()Landroid/content/Intent;

    move-result-object v1

    goto :goto_0

    :cond_1
    iget-object v1, p0, Llt/farmis/libraries/notificationcontroller/NotificationController;->mContext:Landroid/content/Context;

    .line 273
    invoke-static {v1}, Llt/farmis/libraries/notificationcontroller/utilities/NotificationUtilities;->getMainActivityIntent(Landroid/content/Context;)Landroid/content/Intent;

    move-result-object v1

    .line 275
    :cond_2
    :goto_0
    iget-object v3, p0, Llt/farmis/libraries/notificationcontroller/NotificationController;->mContext:Landroid/content/Context;

    invoke-virtual {v3, v1}, Landroid/content/Context;->startActivity(Landroid/content/Intent;)V

    .line 279
    invoke-virtual {p1}, Llt/farmis/libraries/notificationcontroller/data/models/BaseNotificationModel;->getDeliveryFlags()Llt/farmis/libraries/bitflags/BitFlags;

    move-result-object v1

    invoke-interface {v1, v2}, Llt/farmis/libraries/bitflags/BitFlags;->isSet(I)Z

    move-result v1

    xor-int/2addr v1, v2

    if-eqz v1, :cond_3

    .line 281
    iget-object v3, p0, Llt/farmis/libraries/notificationcontroller/NotificationController;->mContext:Landroid/content/Context;

    invoke-virtual {p1, v3}, Llt/farmis/libraries/notificationcontroller/data/models/BaseNotificationModel;->getDatabaseWriter(Landroid/content/Context;)Llt/farmis/libraries/notificationcontroller/data/providers/BaseNotificationDataProvider;

    move-result-object v3

    .line 282
    invoke-virtual {p1}, Llt/farmis/libraries/notificationcontroller/data/models/BaseNotificationModel;->getActualID()I

    move-result v4

    invoke-virtual {v3, v4}, Llt/farmis/libraries/notificationcontroller/data/providers/BaseNotificationDataProvider;->setRead(I)Z

    move-result v3

    goto :goto_1

    :cond_3
    const/4 v3, 0x0

    :goto_1
    if-eqz v1, :cond_4

    if-eqz v3, :cond_6

    .line 289
    :cond_4
    iget-object v1, p0, Llt/farmis/libraries/notificationcontroller/NotificationController;->mContext:Landroid/content/Context;

    invoke-virtual {p1, v1}, Llt/farmis/libraries/notificationcontroller/data/models/BaseNotificationModel;->getCallback(Landroid/content/Context;)Llt/farmis/libraries/notificationcontroller/data/callbacks/NotificationCallback;

    move-result-object p1

    invoke-interface {p1, v2}, Llt/farmis/libraries/notificationcontroller/data/callbacks/NotificationCallback;->onAfterDismissalAction(Z)V

    goto :goto_2

    .line 246
    :cond_5
    sget-object p1, Llt/farmis/libraries/notificationcontroller/NotificationController;->TAG:Ljava/lang/String;

    const-string v1, "Aborting the handling of this event, because the extracted notification model is empty or invalid!"

    invoke-static {p1, v1}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;)I

    .line 249
    new-instance p1, Ljava/security/InvalidParameterException;

    const-string v1, "Could not extract a valid notification model from the received Intent."

    invoke-direct {p1, v1}, Ljava/security/InvalidParameterException;-><init>(Ljava/lang/String;)V

    throw p1
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    :catch_0
    move-exception p1

    .line 292
    invoke-virtual {p1}, Ljava/lang/Exception;->printStackTrace()V

    .line 293
    sget-object p1, Llt/farmis/libraries/notificationcontroller/NotificationController;->TAG:Ljava/lang/String;

    const-string v1, "Failed to create or start an Intent for the open action event for this notification..."

    invoke-static {p1, v1}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;)I

    .line 299
    iget-object p1, p0, Llt/farmis/libraries/notificationcontroller/NotificationController;->mContext:Landroid/content/Context;

    invoke-static {p1}, Llt/farmis/libraries/notificationcontroller/utilities/NotificationUtilities;->startMainActivityIntent(Landroid/content/Context;)V

    .line 301
    iget-object p1, p0, Llt/farmis/libraries/notificationcontroller/NotificationController;->mContext:Landroid/content/Context;

    sget v1, Llt/farmis/libraries/notificationcontroller/R$string;->toast_notification_open_failed:I

    invoke-static {p1, v1, v0}, Landroid/widget/Toast;->makeText(Landroid/content/Context;II)Landroid/widget/Toast;

    move-result-object p1

    invoke-virtual {p1}, Landroid/widget/Toast;->show()V

    :cond_6
    :goto_2
    return-void
.end method

.method public handleSummaryNotificationOpenEvent(Landroid/content/Intent;)V
    .locals 7

    .line 370
    sget-object v0, Llt/farmis/libraries/notificationcontroller/NotificationController;->TAG:Ljava/lang/String;

    const-string v1, "Handling the group summary notification open event..."

    invoke-static {v0, v1}, Landroid/util/Log;->v(Ljava/lang/String;Ljava/lang/String;)I

    const/4 v0, 0x0

    :try_start_0
    const-string v1, "key_notifications"

    .line 375
    invoke-virtual {p1, v1}, Landroid/content/Intent;->getParcelableArrayListExtra(Ljava/lang/String;)Ljava/util/ArrayList;

    move-result-object p1

    if-eqz p1, :cond_6

    .line 378
    invoke-virtual {p1}, Ljava/util/ArrayList;->isEmpty()Z

    move-result v1

    if-nez v1, :cond_6

    .line 385
    invoke-virtual {p1, v0}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Llt/farmis/libraries/notificationcontroller/data/models/BaseNotificationModel;

    .line 392
    invoke-virtual {p1}, Ljava/util/ArrayList;->iterator()Ljava/util/Iterator;

    move-result-object v2

    const/4 v3, 0x0

    :cond_0
    :goto_0
    invoke-interface {v2}, Ljava/util/Iterator;->hasNext()Z

    move-result v4

    const/4 v5, 0x1

    if-eqz v4, :cond_1

    invoke-interface {v2}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v4

    check-cast v4, Llt/farmis/libraries/notificationcontroller/data/models/BaseNotificationModel;

    .line 396
    iget-object v6, p0, Llt/farmis/libraries/notificationcontroller/NotificationController;->mContext:Landroid/content/Context;

    invoke-virtual {v4, v6}, Llt/farmis/libraries/notificationcontroller/data/models/BaseNotificationModel;->getCallback(Landroid/content/Context;)Llt/farmis/libraries/notificationcontroller/data/callbacks/NotificationCallback;

    move-result-object v6

    invoke-interface {v6, v5}, Llt/farmis/libraries/notificationcontroller/data/callbacks/NotificationCallback;->onBeforeDismissalAction(Z)Z

    move-result v6

    if-eqz v6, :cond_0

    .line 397
    invoke-virtual {v4}, Llt/farmis/libraries/notificationcontroller/data/models/BaseNotificationModel;->getDeliveryFlags()Llt/farmis/libraries/bitflags/BitFlags;

    move-result-object v4

    const/4 v6, 0x2

    invoke-interface {v4, v6}, Llt/farmis/libraries/bitflags/BitFlags;->isSet(I)Z

    move-result v4

    if-nez v4, :cond_0

    .line 399
    sget-object v3, Llt/farmis/libraries/notificationcontroller/NotificationController;->TAG:Ljava/lang/String;

    const-string v4, "The event has been consumed and the delivery of the notification is not being forced. The notification should not be opened and the related regular procedures should be cancelled!"

    invoke-static {v3, v4}, Landroid/util/Log;->v(Ljava/lang/String;Ljava/lang/String;)I

    const/4 v3, 0x1

    goto :goto_0

    :cond_1
    if-eqz v3, :cond_2

    .line 408
    sget-object p1, Llt/farmis/libraries/notificationcontroller/NotificationController;->TAG:Ljava/lang/String;

    const-string v1, "At least one notification consumed the event during a callback. Aborting..."

    invoke-static {p1, v1}, Landroid/util/Log;->v(Ljava/lang/String;Ljava/lang/String;)I

    return-void

    .line 417
    :cond_2
    iget-object v2, p0, Llt/farmis/libraries/notificationcontroller/NotificationController;->mContext:Landroid/content/Context;

    invoke-virtual {v1}, Llt/farmis/libraries/notificationcontroller/data/models/BaseNotificationModel;->getConfiguration()Llt/farmis/libraries/notificationcontroller/data/configurations/NotificationConfiguration;

    move-result-object v3

    iget-object v4, p0, Llt/farmis/libraries/notificationcontroller/NotificationController;->mContext:Landroid/content/Context;

    invoke-interface {v3, v4}, Llt/farmis/libraries/notificationcontroller/data/configurations/NotificationConfiguration;->getSummaryNotificationOpenIntent(Landroid/content/Context;)Landroid/content/Intent;

    move-result-object v3

    invoke-virtual {v2, v3}, Landroid/content/Context;->startActivity(Landroid/content/Intent;)V

    .line 420
    invoke-virtual {p1}, Ljava/util/ArrayList;->iterator()Ljava/util/Iterator;

    move-result-object p1

    :cond_3
    :goto_1
    invoke-interface {p1}, Ljava/util/Iterator;->hasNext()Z

    move-result v2

    if-eqz v2, :cond_7

    invoke-interface {p1}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v2

    check-cast v2, Llt/farmis/libraries/notificationcontroller/data/models/BaseNotificationModel;

    .line 423
    invoke-virtual {v1}, Llt/farmis/libraries/notificationcontroller/data/models/BaseNotificationModel;->getDeliveryFlags()Llt/farmis/libraries/bitflags/BitFlags;

    move-result-object v3

    invoke-interface {v3, v5}, Llt/farmis/libraries/bitflags/BitFlags;->isSet(I)Z

    move-result v3

    xor-int/2addr v3, v5

    if-eqz v3, :cond_4

    .line 425
    iget-object v4, p0, Llt/farmis/libraries/notificationcontroller/NotificationController;->mContext:Landroid/content/Context;

    invoke-virtual {v2, v4}, Llt/farmis/libraries/notificationcontroller/data/models/BaseNotificationModel;->getDatabaseWriter(Landroid/content/Context;)Llt/farmis/libraries/notificationcontroller/data/providers/BaseNotificationDataProvider;

    move-result-object v4

    .line 426
    invoke-virtual {v2}, Llt/farmis/libraries/notificationcontroller/data/models/BaseNotificationModel;->getActualID()I

    move-result v6

    invoke-virtual {v4, v6}, Llt/farmis/libraries/notificationcontroller/data/providers/BaseNotificationDataProvider;->setInactive(I)Z

    move-result v4

    goto :goto_2

    :cond_4
    const/4 v4, 0x0

    :goto_2
    if-eqz v3, :cond_5

    if-eqz v4, :cond_3

    .line 433
    :cond_5
    iget-object v3, p0, Llt/farmis/libraries/notificationcontroller/NotificationController;->mContext:Landroid/content/Context;

    invoke-virtual {v2, v3}, Llt/farmis/libraries/notificationcontroller/data/models/BaseNotificationModel;->getCallback(Landroid/content/Context;)Llt/farmis/libraries/notificationcontroller/data/callbacks/NotificationCallback;

    move-result-object v2

    invoke-interface {v2, v5}, Llt/farmis/libraries/notificationcontroller/data/callbacks/NotificationCallback;->onAfterDismissalAction(Z)V

    goto :goto_1

    .line 379
    :cond_6
    sget-object p1, Llt/farmis/libraries/notificationcontroller/NotificationController;->TAG:Ljava/lang/String;

    const-string v1, "Aborting the handling of this event, because the extracted List of notification models is invalid or empty!"

    invoke-static {p1, v1}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;)I

    .line 382
    new-instance p1, Ljava/security/InvalidParameterException;

    const-string v1, "Could not extract a valid List of notification models from the received Intent."

    invoke-direct {p1, v1}, Ljava/security/InvalidParameterException;-><init>(Ljava/lang/String;)V

    throw p1
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    :catch_0
    move-exception p1

    .line 437
    invoke-virtual {p1}, Ljava/lang/Exception;->printStackTrace()V

    .line 438
    sget-object p1, Llt/farmis/libraries/notificationcontroller/NotificationController;->TAG:Ljava/lang/String;

    const-string v1, "Failed to create or start an Intent for the open action event for this summary notification..."

    invoke-static {p1, v1}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;)I

    .line 444
    iget-object p1, p0, Llt/farmis/libraries/notificationcontroller/NotificationController;->mContext:Landroid/content/Context;

    invoke-static {p1}, Llt/farmis/libraries/notificationcontroller/utilities/NotificationUtilities;->startMainActivityIntent(Landroid/content/Context;)V

    .line 446
    iget-object p1, p0, Llt/farmis/libraries/notificationcontroller/NotificationController;->mContext:Landroid/content/Context;

    sget v1, Llt/farmis/libraries/notificationcontroller/R$string;->toast_notification_open_failed:I

    invoke-static {p1, v1, v0}, Landroid/widget/Toast;->makeText(Landroid/content/Context;II)Landroid/widget/Toast;

    move-result-object p1

    invoke-virtual {p1}, Landroid/widget/Toast;->show()V

    :cond_7
    return-void
.end method

.method public processNotification(Llt/farmis/libraries/notificationcontroller/data/models/BaseNotificationModel;)V
    .locals 10
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "<N:",
            "Llt/farmis/libraries/notificationcontroller/data/models/BaseNotificationModel;",
            ">(TN;)V"
        }
    .end annotation

    if-eqz p1, :cond_9

    .line 505
    invoke-virtual {p1}, Llt/farmis/libraries/notificationcontroller/data/models/BaseNotificationModel;->isEmpty()Z

    move-result v0

    if-nez v0, :cond_9

    .line 517
    iget-object v0, p0, Llt/farmis/libraries/notificationcontroller/NotificationController;->mContext:Landroid/content/Context;

    invoke-virtual {p1, v0}, Llt/farmis/libraries/notificationcontroller/data/models/BaseNotificationModel;->getCallback(Landroid/content/Context;)Llt/farmis/libraries/notificationcontroller/data/callbacks/NotificationCallback;

    move-result-object v0

    invoke-interface {v0}, Llt/farmis/libraries/notificationcontroller/data/callbacks/NotificationCallback;->onBeforeDeliveryAction()Z

    move-result v0

    const/4 v1, 0x2

    if-eqz v0, :cond_0

    .line 518
    invoke-virtual {p1}, Llt/farmis/libraries/notificationcontroller/data/models/BaseNotificationModel;->getDeliveryFlags()Llt/farmis/libraries/bitflags/BitFlags;

    move-result-object v0

    invoke-interface {v0, v1}, Llt/farmis/libraries/bitflags/BitFlags;->isSet(I)Z

    move-result v0

    if-nez v0, :cond_0

    .line 520
    sget-object p1, Llt/farmis/libraries/notificationcontroller/NotificationController;->TAG:Ljava/lang/String;

    const-string v0, "The event has been consumed and the delivery of the notification is not being forced. The notification should not be processed and the related regular procedures should be cancelled!"

    invoke-static {p1, v0}, Landroid/util/Log;->v(Ljava/lang/String;Ljava/lang/String;)I

    return-void

    .line 528
    :cond_0
    iget-object v0, p0, Llt/farmis/libraries/notificationcontroller/NotificationController;->mContext:Landroid/content/Context;

    invoke-virtual {p1, v0}, Llt/farmis/libraries/notificationcontroller/data/models/BaseNotificationModel;->getDatabaseWriter(Landroid/content/Context;)Llt/farmis/libraries/notificationcontroller/data/providers/BaseNotificationDataProvider;

    move-result-object v0

    .line 533
    invoke-virtual {p1}, Llt/farmis/libraries/notificationcontroller/data/models/BaseNotificationModel;->getDeliveryFlags()Llt/farmis/libraries/bitflags/BitFlags;

    move-result-object v2

    const/4 v3, 0x1

    .line 534
    invoke-interface {v2, v3}, Llt/farmis/libraries/bitflags/BitFlags;->isSet(I)Z

    move-result v4

    const/4 v5, 0x0

    if-nez v4, :cond_1

    if-eqz v0, :cond_1

    const/4 v4, 0x1

    goto :goto_0

    :cond_1
    const/4 v4, 0x0

    :goto_0
    const/16 v6, 0x8

    .line 535
    invoke-interface {v2, v6}, Llt/farmis/libraries/bitflags/BitFlags;->isSet(I)Z

    move-result v6

    .line 536
    invoke-interface {v2, v1}, Llt/farmis/libraries/bitflags/BitFlags;->isSet(I)Z

    move-result v7

    if-eqz v4, :cond_2

    .line 539
    invoke-virtual {v0}, Llt/farmis/libraries/notificationcontroller/data/providers/BaseNotificationDataProvider;->getActiveNotificationCount()I

    move-result v8

    goto :goto_1

    :cond_2
    const/4 v8, 0x0

    :goto_1
    if-eqz v4, :cond_4

    .line 542
    invoke-virtual {p0}, Llt/farmis/libraries/notificationcontroller/NotificationController;->getSettings()Llt/farmis/libraries/notificationcontroller/NotificationControllerSettings;

    move-result-object v9

    invoke-virtual {v9}, Llt/farmis/libraries/notificationcontroller/NotificationControllerSettings;->getDeliverableNotificationLimit()I

    move-result v9

    if-le v8, v9, :cond_4

    if-nez v7, :cond_4

    .line 543
    sget-object v2, Llt/farmis/libraries/notificationcontroller/NotificationController;->TAG:Ljava/lang/String;

    const-string v9, "The maximum deliverable notification limit has been reached! Executing appropriate procedures..."

    invoke-static {v2, v9}, Landroid/util/Log;->w(Ljava/lang/String;Ljava/lang/String;)I

    .line 547
    invoke-virtual {p1}, Llt/farmis/libraries/notificationcontroller/data/models/BaseNotificationModel;->getDeliveryFlags()Llt/farmis/libraries/bitflags/BitFlags;

    move-result-object v2

    invoke-virtual {p0}, Llt/farmis/libraries/notificationcontroller/NotificationController;->getSettings()Llt/farmis/libraries/notificationcontroller/NotificationControllerSettings;

    move-result-object v9

    invoke-virtual {v9}, Llt/farmis/libraries/notificationcontroller/NotificationControllerSettings;->getDeliveryLimitComboFlag()[I

    move-result-object v9

    invoke-interface {v2, v9}, Llt/farmis/libraries/bitflags/BitFlags;->set([I)Llt/farmis/libraries/bitflags/BitFlags;

    .line 550
    invoke-virtual {p0}, Llt/farmis/libraries/notificationcontroller/NotificationController;->getSettings()Llt/farmis/libraries/notificationcontroller/NotificationControllerSettings;

    move-result-object v9

    invoke-virtual {v9}, Llt/farmis/libraries/notificationcontroller/NotificationControllerSettings;->shouldShowDeliveryLimitNotification()Z

    move-result v9

    if-eqz v9, :cond_3

    .line 551
    invoke-virtual {p0}, Llt/farmis/libraries/notificationcontroller/NotificationController;->getSettings()Llt/farmis/libraries/notificationcontroller/NotificationControllerSettings;

    move-result-object v9

    invoke-virtual {v9}, Llt/farmis/libraries/notificationcontroller/NotificationControllerSettings;->getLimitNotificationModel()Llt/farmis/libraries/notificationcontroller/data/models/BaseLimitNotificationModel;

    move-result-object v9

    invoke-virtual {v9, v8}, Llt/farmis/libraries/notificationcontroller/data/models/BaseLimitNotificationModel;->setActiveNotificationCount(I)V

    .line 554
    invoke-virtual {p0}, Llt/farmis/libraries/notificationcontroller/NotificationController;->getSettings()Llt/farmis/libraries/notificationcontroller/NotificationControllerSettings;

    move-result-object v8

    invoke-virtual {v8}, Llt/farmis/libraries/notificationcontroller/NotificationControllerSettings;->getLimitNotificationModel()Llt/farmis/libraries/notificationcontroller/data/models/BaseLimitNotificationModel;

    move-result-object v8

    iget-object v9, p0, Llt/farmis/libraries/notificationcontroller/NotificationController;->mContext:Landroid/content/Context;

    invoke-virtual {v8, v9}, Llt/farmis/libraries/notificationcontroller/data/models/BaseNotificationModel;->processRetainChanges(Landroid/content/Context;)Llt/farmis/libraries/notificationcontroller/data/models/BaseNotificationModel;

    .line 558
    :cond_3
    invoke-virtual {p0}, Llt/farmis/libraries/notificationcontroller/NotificationController;->getSettings()Llt/farmis/libraries/notificationcontroller/NotificationControllerSettings;

    move-result-object v8

    invoke-virtual {v8}, Llt/farmis/libraries/notificationcontroller/NotificationControllerSettings;->shouldCancelActiveNotificationsOnLimitReached()Z

    move-result v8

    if-eqz v8, :cond_4

    .line 561
    invoke-virtual {v0}, Llt/farmis/libraries/notificationcontroller/data/providers/BaseNotificationDataProvider;->getActiveNotifications()Ljava/util/List;

    move-result-object v8

    invoke-virtual {p0, v8}, Llt/farmis/libraries/notificationcontroller/NotificationController;->cancelActiveNotifications(Ljava/util/List;)V

    :cond_4
    if-eqz v4, :cond_5

    .line 569
    invoke-virtual {v0, p1}, Llt/farmis/libraries/notificationcontroller/data/providers/BaseNotificationDataProvider;->insertNotification(Llt/farmis/libraries/notificationcontroller/data/models/BaseNotificationModel;)I

    move-result v8

    invoke-virtual {p1, v8}, Llt/farmis/libraries/notificationcontroller/data/models/BaseNotificationModel;->setID(I)V

    goto :goto_2

    .line 571
    :cond_5
    sget-object v8, Llt/farmis/libraries/notificationcontroller/NotificationController;->TAG:Ljava/lang/String;

    const-string v9, "Delivery properties do not allow this notification to be saved to any persistent storage. Procedure skipped..."

    invoke-static {v8, v9}, Landroid/util/Log;->v(Ljava/lang/String;Ljava/lang/String;)I

    .line 575
    :goto_2
    new-array v1, v1, [I

    fill-array-data v1, :array_0

    invoke-interface {v2, v1}, Llt/farmis/libraries/bitflags/BitFlags;->areEitherSet([I)Z

    move-result v1

    if-eqz v1, :cond_7

    .line 576
    invoke-interface {v2, v5}, Llt/farmis/libraries/bitflags/BitFlags;->isSet(I)Z

    move-result v1

    if-nez v1, :cond_6

    if-eqz v7, :cond_6

    goto :goto_3

    .line 589
    :cond_6
    sget-object p1, Llt/farmis/libraries/notificationcontroller/NotificationController;->TAG:Ljava/lang/String;

    const-string v0, "The notification delivery properties disallow showing this notification to the user. Actual delivery was canceled..."

    invoke-static {p1, v0}, Landroid/util/Log;->v(Ljava/lang/String;Ljava/lang/String;)I

    goto :goto_4

    .line 579
    :cond_7
    :goto_3
    invoke-virtual {p0, p1}, Llt/farmis/libraries/notificationcontroller/NotificationController;->showNotification(Llt/farmis/libraries/notificationcontroller/data/models/BaseNotificationModel;)V

    if-eqz v6, :cond_8

    if-eqz v4, :cond_8

    .line 582
    invoke-virtual {p1}, Llt/farmis/libraries/notificationcontroller/data/models/BaseNotificationModel;->getUsableGroupID()Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Llt/farmis/libraries/notificationcontroller/data/providers/BaseNotificationDataProvider;->getActiveNotificationInGroupCount(Ljava/lang/String;)I

    move-result v0

    if-le v0, v3, :cond_8

    .line 583
    invoke-virtual {p0, p1}, Llt/farmis/libraries/notificationcontroller/NotificationController;->showGroupSummaryNotificationDelayed(Llt/farmis/libraries/notificationcontroller/data/models/BaseNotificationModel;)V

    .line 587
    :cond_8
    iget-object v0, p0, Llt/farmis/libraries/notificationcontroller/NotificationController;->mContext:Landroid/content/Context;

    invoke-virtual {p1, v0}, Llt/farmis/libraries/notificationcontroller/data/models/BaseNotificationModel;->getCallback(Landroid/content/Context;)Llt/farmis/libraries/notificationcontroller/data/callbacks/NotificationCallback;

    move-result-object p1

    invoke-interface {p1}, Llt/farmis/libraries/notificationcontroller/data/callbacks/NotificationCallback;->onAfterDeliveryAction()V

    :goto_4
    return-void

    .line 506
    :cond_9
    sget-object p1, Llt/farmis/libraries/notificationcontroller/NotificationController;->TAG:Ljava/lang/String;

    const-string v0, "The received notification model is null or empty. Cannot process. Aborting..."

    invoke-static {p1, v0}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;)I

    .line 509
    new-instance p1, Ljava/security/InvalidParameterException;

    const-string v0, "The provided notification model is invalid or empty!"

    invoke-direct {p1, v0}, Ljava/security/InvalidParameterException;-><init>(Ljava/lang/String;)V

    throw p1

    nop

    :array_0
    .array-data 4
        0x0
        0x5
    .end array-data
.end method

.method protected provideDeliveryFeedback(Landroidx/core/app/NotificationCompat$Builder;Llt/farmis/libraries/notificationcontroller/data/models/BaseNotificationModel;)V
    .locals 3
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "<N:",
            "Llt/farmis/libraries/notificationcontroller/data/models/BaseNotificationModel;",
            ">(",
            "Landroidx/core/app/NotificationCompat$Builder;",
            "TN;)V"
        }
    .end annotation

    .line 880
    invoke-virtual {p2}, Llt/farmis/libraries/notificationcontroller/data/models/BaseNotificationModel;->getDeliveryFlags()Llt/farmis/libraries/bitflags/BitFlags;

    move-result-object v0

    const/16 v1, 0xa

    invoke-interface {v0, v1}, Llt/farmis/libraries/bitflags/BitFlags;->isSet(I)Z

    move-result v0

    const/4 v1, 0x2

    if-nez v0, :cond_0

    .line 881
    new-instance v0, Ljava/lang/StringBuilder;

    invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V

    const-string v2, "android.resource://"

    invoke-virtual {v0, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    iget-object v2, p0, Llt/farmis/libraries/notificationcontroller/NotificationController;->mContext:Landroid/content/Context;

    invoke-virtual {v2}, Landroid/content/Context;->getPackageName()Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v0, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    const-string v2, "/"

    invoke-virtual {v0, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {p2}, Llt/farmis/libraries/notificationcontroller/data/models/BaseNotificationModel;->getConfiguration()Llt/farmis/libraries/notificationcontroller/data/configurations/NotificationConfiguration;

    move-result-object v2

    invoke-interface {v2}, Llt/farmis/libraries/notificationcontroller/data/configurations/NotificationConfiguration;->getSoundResource()I

    move-result v2

    invoke-virtual {v0, v2}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    invoke-static {v0}, Landroid/net/Uri;->parse(Ljava/lang/String;)Landroid/net/Uri;

    move-result-object v0

    .line 882
    invoke-static {v1}, Landroid/media/RingtoneManager;->getDefaultUri(I)Landroid/net/Uri;

    move-result-object v2

    .line 883
    invoke-virtual {p1, v0}, Landroidx/core/app/NotificationCompat$Builder;->setSound(Landroid/net/Uri;)Landroidx/core/app/NotificationCompat$Builder;

    .line 884
    invoke-virtual {p1, v2}, Landroidx/core/app/NotificationCompat$Builder;->setSound(Landroid/net/Uri;)Landroidx/core/app/NotificationCompat$Builder;

    .line 888
    :cond_0
    invoke-virtual {p2}, Llt/farmis/libraries/notificationcontroller/data/models/BaseNotificationModel;->getDeliveryFlags()Llt/farmis/libraries/bitflags/BitFlags;

    move-result-object v0

    const/16 v2, 0xb

    invoke-interface {v0, v2}, Llt/farmis/libraries/bitflags/BitFlags;->isSet(I)Z

    move-result v0

    if-nez v0, :cond_2

    .line 890
    invoke-virtual {p2}, Llt/farmis/libraries/notificationcontroller/data/models/BaseNotificationModel;->getDeliveryFlags()Llt/farmis/libraries/bitflags/BitFlags;

    move-result-object v0

    const/16 v2, 0xc

    invoke-interface {v0, v2}, Llt/farmis/libraries/bitflags/BitFlags;->isSet(I)Z

    move-result v0

    if-eqz v0, :cond_1

    .line 891
    invoke-virtual {p0}, Llt/farmis/libraries/notificationcontroller/NotificationController;->getSettings()Llt/farmis/libraries/notificationcontroller/NotificationControllerSettings;

    move-result-object v0

    invoke-virtual {v0}, Llt/farmis/libraries/notificationcontroller/NotificationControllerSettings;->getBriefVibrationPattern()[J

    move-result-object v0

    invoke-virtual {p1, v0}, Landroidx/core/app/NotificationCompat$Builder;->setVibrate([J)Landroidx/core/app/NotificationCompat$Builder;

    goto :goto_0

    .line 893
    :cond_1
    invoke-virtual {p0}, Llt/farmis/libraries/notificationcontroller/NotificationController;->getSettings()Llt/farmis/libraries/notificationcontroller/NotificationControllerSettings;

    move-result-object v0

    invoke-virtual {v0}, Llt/farmis/libraries/notificationcontroller/NotificationControllerSettings;->getRegularVibrationPattern()[J

    move-result-object v0

    invoke-virtual {p1, v0}, Landroidx/core/app/NotificationCompat$Builder;->setVibrate([J)Landroidx/core/app/NotificationCompat$Builder;

    .line 898
    :cond_2
    :goto_0
    invoke-virtual {p2}, Llt/farmis/libraries/notificationcontroller/data/models/BaseNotificationModel;->getDeliveryFlags()Llt/farmis/libraries/bitflags/BitFlags;

    move-result-object v0

    new-array v1, v1, [I

    fill-array-data v1, :array_0

    invoke-interface {v0, v1}, Llt/farmis/libraries/bitflags/BitFlags;->areSet([I)Z

    move-result v0

    if-nez v0, :cond_3

    .line 901
    invoke-virtual {p2}, Llt/farmis/libraries/notificationcontroller/data/models/BaseNotificationModel;->getConfiguration()Llt/farmis/libraries/notificationcontroller/data/configurations/NotificationConfiguration;

    move-result-object p2

    iget-object v0, p0, Llt/farmis/libraries/notificationcontroller/NotificationController;->mContext:Landroid/content/Context;

    invoke-interface {p2, v0}, Llt/farmis/libraries/notificationcontroller/data/configurations/NotificationConfiguration;->getPriorityColor(Landroid/content/Context;)I

    move-result p2

    const/16 v0, 0x190

    invoke-virtual {p1, p2, v0, v0}, Landroidx/core/app/NotificationCompat$Builder;->setLights(III)Landroidx/core/app/NotificationCompat$Builder;

    :cond_3
    return-void

    :array_0
    .array-data 4
        0xa
        0xb
    .end array-data
.end method

.method protected showGroupSummaryNotification(Llt/farmis/libraries/notificationcontroller/data/models/BaseNotificationModel;)V
    .locals 9
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "<N:",
            "Llt/farmis/libraries/notificationcontroller/data/models/BaseNotificationModel;",
            ">(TN;)V"
        }
    .end annotation

    .line 778
    invoke-virtual {p1}, Llt/farmis/libraries/notificationcontroller/data/models/BaseNotificationModel;->getUsableGroupID()Ljava/lang/String;

    move-result-object v0

    .line 781
    invoke-virtual {p1}, Llt/farmis/libraries/notificationcontroller/data/models/BaseNotificationModel;->getConfiguration()Llt/farmis/libraries/notificationcontroller/data/configurations/NotificationConfiguration;

    move-result-object v1

    .line 784
    iget-object v2, p0, Llt/farmis/libraries/notificationcontroller/NotificationController;->mContext:Landroid/content/Context;

    invoke-virtual {p1, v2}, Llt/farmis/libraries/notificationcontroller/data/models/BaseNotificationModel;->getDatabaseWriter(Landroid/content/Context;)Llt/farmis/libraries/notificationcontroller/data/providers/BaseNotificationDataProvider;

    move-result-object v2

    .line 786
    invoke-virtual {v2, v0}, Llt/farmis/libraries/notificationcontroller/data/providers/BaseNotificationDataProvider;->getActiveNotificationsInGroup(Ljava/lang/String;)Ljava/util/List;

    move-result-object v3

    .line 787
    invoke-interface {v3}, Ljava/util/List;->size()I

    move-result v4

    .line 790
    invoke-interface {v3}, Ljava/util/List;->iterator()Ljava/util/Iterator;

    move-result-object v5

    :goto_0
    invoke-interface {v5}, Ljava/util/Iterator;->hasNext()Z

    move-result v6

    if-eqz v6, :cond_0

    invoke-interface {v5}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v6

    check-cast v6, Llt/farmis/libraries/notificationcontroller/data/models/BaseNotificationModel;

    .line 791
    iget-object v7, p0, Llt/farmis/libraries/notificationcontroller/NotificationController;->mNotificationManager:Landroidx/core/app/NotificationManagerCompat;

    invoke-virtual {v6}, Llt/farmis/libraries/notificationcontroller/data/models/BaseNotificationModel;->getUsableID()I

    move-result v8

    invoke-virtual {v7, v8}, Landroidx/core/app/NotificationManagerCompat;->cancel(I)V

    .line 793
    invoke-virtual {v6}, Llt/farmis/libraries/notificationcontroller/data/models/BaseNotificationModel;->getActualID()I

    move-result v6

    invoke-virtual {v2, v6}, Llt/farmis/libraries/notificationcontroller/data/providers/BaseNotificationDataProvider;->setActive(I)Z

    goto :goto_0

    .line 797
    :cond_0
    invoke-virtual {p0, v3}, Llt/farmis/libraries/notificationcontroller/NotificationController;->createSummaryNotificationContentPendingIntent(Ljava/util/List;)Landroid/app/PendingIntent;

    move-result-object v2

    .line 800
    invoke-virtual {p0, v3}, Llt/farmis/libraries/notificationcontroller/NotificationController;->createNotificationDeletePendingIntent(Ljava/util/List;)Landroid/app/PendingIntent;

    move-result-object v5

    .line 803
    new-instance v6, Landroidx/core/app/NotificationCompat$InboxStyle;

    invoke-direct {v6}, Landroidx/core/app/NotificationCompat$InboxStyle;-><init>()V

    .line 805
    iget-object v7, p0, Llt/farmis/libraries/notificationcontroller/NotificationController;->mContext:Landroid/content/Context;

    invoke-interface {v1, v7}, Llt/farmis/libraries/notificationcontroller/data/configurations/NotificationConfiguration;->getSummaryTitle(Landroid/content/Context;)Ljava/lang/String;

    move-result-object v7

    invoke-virtual {v6, v7}, Landroidx/core/app/NotificationCompat$InboxStyle;->setBigContentTitle(Ljava/lang/CharSequence;)Landroidx/core/app/NotificationCompat$InboxStyle;

    .line 806
    iget-object v7, p0, Llt/farmis/libraries/notificationcontroller/NotificationController;->mContext:Landroid/content/Context;

    invoke-interface {v1, v7}, Llt/farmis/libraries/notificationcontroller/data/configurations/NotificationConfiguration;->getSummaryText(Landroid/content/Context;)Ljava/lang/String;

    move-result-object v7

    invoke-virtual {v6, v7}, Landroidx/core/app/NotificationCompat$InboxStyle;->setSummaryText(Ljava/lang/CharSequence;)Landroidx/core/app/NotificationCompat$InboxStyle;

    .line 808
    invoke-interface {v3}, Ljava/util/List;->iterator()Ljava/util/Iterator;

    move-result-object v3

    :goto_1
    invoke-interface {v3}, Ljava/util/Iterator;->hasNext()Z

    move-result v7

    if-eqz v7, :cond_1

    invoke-interface {v3}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v7

    check-cast v7, Llt/farmis/libraries/notificationcontroller/data/models/BaseNotificationModel;

    .line 810
    iget-object v8, p0, Llt/farmis/libraries/notificationcontroller/NotificationController;->mContext:Landroid/content/Context;

    invoke-static {v8, v7}, Llt/farmis/libraries/notificationcontroller/utilities/NotificationHelper;->makeStyledNotificationInboxLine(Landroid/content/Context;Llt/farmis/libraries/notificationcontroller/data/models/BaseNotificationModel;)Landroid/text/SpannableString;

    move-result-object v7

    .line 813
    invoke-virtual {v6, v7}, Landroidx/core/app/NotificationCompat$InboxStyle;->addLine(Ljava/lang/CharSequence;)Landroidx/core/app/NotificationCompat$InboxStyle;

    goto :goto_1

    .line 817
    :cond_1
    new-instance v3, Landroidx/core/app/NotificationCompat$Builder;

    iget-object v7, p0, Llt/farmis/libraries/notificationcontroller/NotificationController;->mContext:Landroid/content/Context;

    invoke-direct {v3, v7}, Landroidx/core/app/NotificationCompat$Builder;-><init>(Landroid/content/Context;)V

    .line 818
    invoke-interface {v1}, Llt/farmis/libraries/notificationcontroller/data/configurations/NotificationConfiguration;->getCategory()Ljava/lang/String;

    move-result-object v7

    invoke-virtual {v3, v7}, Landroidx/core/app/NotificationCompat$Builder;->setCategory(Ljava/lang/String;)Landroidx/core/app/NotificationCompat$Builder;

    iget-object v7, p0, Llt/farmis/libraries/notificationcontroller/NotificationController;->mContext:Landroid/content/Context;

    .line 819
    invoke-interface {v1, v7}, Llt/farmis/libraries/notificationcontroller/data/configurations/NotificationConfiguration;->getAccentColor(Landroid/content/Context;)I

    move-result v7

    invoke-virtual {v3, v7}, Landroidx/core/app/NotificationCompat$Builder;->setColor(I)Landroidx/core/app/NotificationCompat$Builder;

    .line 821
    invoke-virtual {v3, v2}, Landroidx/core/app/NotificationCompat$Builder;->setContentIntent(Landroid/app/PendingIntent;)Landroidx/core/app/NotificationCompat$Builder;

    .line 822
    invoke-virtual {v3, v5}, Landroidx/core/app/NotificationCompat$Builder;->setDeleteIntent(Landroid/app/PendingIntent;)Landroidx/core/app/NotificationCompat$Builder;

    const/4 v2, 0x1

    .line 824
    invoke-virtual {v3, v2}, Landroidx/core/app/NotificationCompat$Builder;->setAutoCancel(Z)Landroidx/core/app/NotificationCompat$Builder;

    .line 826
    invoke-virtual {p1}, Llt/farmis/libraries/notificationcontroller/data/models/BaseNotificationModel;->getAdjustedPriority()I

    move-result v5

    invoke-virtual {v3, v5}, Landroidx/core/app/NotificationCompat$Builder;->setPriority(I)Landroidx/core/app/NotificationCompat$Builder;

    .line 827
    invoke-virtual {p1}, Llt/farmis/libraries/notificationcontroller/data/models/BaseNotificationModel;->getVisibility()I

    move-result v5

    invoke-virtual {v3, v5}, Landroidx/core/app/NotificationCompat$Builder;->setVisibility(I)Landroidx/core/app/NotificationCompat$Builder;

    iget-object v5, p0, Llt/farmis/libraries/notificationcontroller/NotificationController;->mContext:Landroid/content/Context;

    .line 829
    invoke-interface {v1, v5}, Llt/farmis/libraries/notificationcontroller/data/configurations/NotificationConfiguration;->getTicker(Landroid/content/Context;)Ljava/lang/String;

    move-result-object v5

    invoke-virtual {v3, v5}, Landroidx/core/app/NotificationCompat$Builder;->setTicker(Ljava/lang/CharSequence;)Landroidx/core/app/NotificationCompat$Builder;

    .line 831
    invoke-interface {v1}, Llt/farmis/libraries/notificationcontroller/data/configurations/NotificationConfiguration;->getSmallIcon()I

    move-result v5

    invoke-virtual {v3, v5}, Landroidx/core/app/NotificationCompat$Builder;->setSmallIcon(I)Landroidx/core/app/NotificationCompat$Builder;

    iget-object v5, p0, Llt/farmis/libraries/notificationcontroller/NotificationController;->mContext:Landroid/content/Context;

    .line 832
    invoke-interface {v1, v5}, Llt/farmis/libraries/notificationcontroller/data/configurations/NotificationConfiguration;->getLargeIconForGroup(Landroid/content/Context;)Landroid/graphics/Bitmap;

    move-result-object v5

    invoke-virtual {v3, v5}, Landroidx/core/app/NotificationCompat$Builder;->setLargeIcon(Landroid/graphics/Bitmap;)Landroidx/core/app/NotificationCompat$Builder;

    iget-object v5, p0, Llt/farmis/libraries/notificationcontroller/NotificationController;->mContext:Landroid/content/Context;

    .line 834
    invoke-interface {v1, v5}, Llt/farmis/libraries/notificationcontroller/data/configurations/NotificationConfiguration;->getSummaryTitle(Landroid/content/Context;)Ljava/lang/String;

    move-result-object v5

    invoke-virtual {v3, v5}, Landroidx/core/app/NotificationCompat$Builder;->setContentTitle(Ljava/lang/CharSequence;)Landroidx/core/app/NotificationCompat$Builder;

    iget-object v5, p0, Llt/farmis/libraries/notificationcontroller/NotificationController;->mContext:Landroid/content/Context;

    .line 835
    invoke-interface {v1, v5}, Llt/farmis/libraries/notificationcontroller/data/configurations/NotificationConfiguration;->getSummaryContent(Landroid/content/Context;)Ljava/lang/String;

    move-result-object v5

    invoke-virtual {v3, v5}, Landroidx/core/app/NotificationCompat$Builder;->setContentText(Ljava/lang/CharSequence;)Landroidx/core/app/NotificationCompat$Builder;

    .line 837
    invoke-virtual {v3, v6}, Landroidx/core/app/NotificationCompat$Builder;->setStyle(Landroidx/core/app/NotificationCompat$Style;)Landroidx/core/app/NotificationCompat$Builder;

    .line 838
    invoke-virtual {v3, v4}, Landroidx/core/app/NotificationCompat$Builder;->setNumber(I)Landroidx/core/app/NotificationCompat$Builder;

    .line 840
    invoke-virtual {v3, v2}, Landroidx/core/app/NotificationCompat$Builder;->setGroupSummary(Z)Landroidx/core/app/NotificationCompat$Builder;

    .line 841
    invoke-virtual {v3, v0}, Landroidx/core/app/NotificationCompat$Builder;->setGroup(Ljava/lang/String;)Landroidx/core/app/NotificationCompat$Builder;

    .line 844
    invoke-virtual {p0, v3, p1}, Llt/farmis/libraries/notificationcontroller/NotificationController;->provideDeliveryFeedback(Landroidx/core/app/NotificationCompat$Builder;Llt/farmis/libraries/notificationcontroller/data/models/BaseNotificationModel;)V

    .line 847
    invoke-interface {v1}, Llt/farmis/libraries/notificationcontroller/data/configurations/NotificationConfiguration;->obtainSummaryNotificationID()I

    move-result p1

    .line 850
    invoke-virtual {v3}, Landroidx/core/app/NotificationCompat$Builder;->build()Landroid/app/Notification;

    move-result-object v0

    .line 851
    iget-object v1, p0, Llt/farmis/libraries/notificationcontroller/NotificationController;->mNotificationManager:Landroidx/core/app/NotificationManagerCompat;

    invoke-virtual {v1, p1, v0}, Landroidx/core/app/NotificationManagerCompat;->notify(ILandroid/app/Notification;)V

    return-void
.end method

.method protected showGroupSummaryNotificationDelayed(Llt/farmis/libraries/notificationcontroller/data/models/BaseNotificationModel;)V
    .locals 4
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "<N:",
            "Llt/farmis/libraries/notificationcontroller/data/models/BaseNotificationModel;",
            ">(TN;)V"
        }
    .end annotation

    .line 731
    invoke-virtual {p0}, Llt/farmis/libraries/notificationcontroller/NotificationController;->getHandler()Landroid/os/Handler;

    move-result-object v0

    new-instance v1, Llt/farmis/libraries/notificationcontroller/NotificationController$1;

    invoke-direct {v1, p0, p1}, Llt/farmis/libraries/notificationcontroller/NotificationController$1;-><init>(Llt/farmis/libraries/notificationcontroller/NotificationController;Llt/farmis/libraries/notificationcontroller/data/models/BaseNotificationModel;)V

    .line 742
    invoke-virtual {p0}, Llt/farmis/libraries/notificationcontroller/NotificationController;->getSettings()Llt/farmis/libraries/notificationcontroller/NotificationControllerSettings;

    move-result-object p1

    invoke-virtual {p1}, Llt/farmis/libraries/notificationcontroller/NotificationControllerSettings;->getNotificationStackingDelay()I

    move-result p1

    int-to-long v2, p1

    .line 731
    invoke-virtual {v0, v1, v2, v3}, Landroid/os/Handler;->postDelayed(Ljava/lang/Runnable;J)Z

    return-void
.end method

.method protected showNotification(Llt/farmis/libraries/notificationcontroller/data/models/BaseNotificationModel;)V
    .locals 6
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "<N:",
            "Llt/farmis/libraries/notificationcontroller/data/models/BaseNotificationModel;",
            ">(TN;)V"
        }
    .end annotation

    .line 626
    invoke-virtual {p1}, Llt/farmis/libraries/notificationcontroller/data/models/BaseNotificationModel;->getConfiguration()Llt/farmis/libraries/notificationcontroller/data/configurations/NotificationConfiguration;

    move-result-object v0

    .line 629
    invoke-virtual {p0, p1}, Llt/farmis/libraries/notificationcontroller/NotificationController;->createNotificationContentPendingIntent(Llt/farmis/libraries/notificationcontroller/data/models/BaseNotificationModel;)Landroid/app/PendingIntent;

    move-result-object v1

    .line 630
    invoke-virtual {p0, p1}, Llt/farmis/libraries/notificationcontroller/NotificationController;->createNotificationDeletePendingIntent(Llt/farmis/libraries/notificationcontroller/data/models/BaseNotificationModel;)Landroid/app/PendingIntent;

    move-result-object v2

    .line 633
    new-instance v3, Landroidx/core/app/NotificationCompat$Builder;

    iget-object v4, p0, Llt/farmis/libraries/notificationcontroller/NotificationController;->mContext:Landroid/content/Context;

    invoke-direct {v3, v4}, Landroidx/core/app/NotificationCompat$Builder;-><init>(Landroid/content/Context;)V

    .line 634
    invoke-virtual {p1}, Llt/farmis/libraries/notificationcontroller/data/models/BaseNotificationModel;->getConfiguration()Llt/farmis/libraries/notificationcontroller/data/configurations/NotificationConfiguration;

    move-result-object v4

    invoke-interface {v4}, Llt/farmis/libraries/notificationcontroller/data/configurations/NotificationConfiguration;->getCategory()Ljava/lang/String;

    move-result-object v4

    invoke-virtual {v3, v4}, Landroidx/core/app/NotificationCompat$Builder;->setCategory(Ljava/lang/String;)Landroidx/core/app/NotificationCompat$Builder;

    .line 635
    invoke-virtual {p1}, Llt/farmis/libraries/notificationcontroller/data/models/BaseNotificationModel;->getConfiguration()Llt/farmis/libraries/notificationcontroller/data/configurations/NotificationConfiguration;

    move-result-object v4

    iget-object v5, p0, Llt/farmis/libraries/notificationcontroller/NotificationController;->mContext:Landroid/content/Context;

    invoke-interface {v4, v5}, Llt/farmis/libraries/notificationcontroller/data/configurations/NotificationConfiguration;->getAccentColor(Landroid/content/Context;)I

    move-result v4

    invoke-virtual {v3, v4}, Landroidx/core/app/NotificationCompat$Builder;->setColor(I)Landroidx/core/app/NotificationCompat$Builder;

    .line 637
    invoke-virtual {v3, v1}, Landroidx/core/app/NotificationCompat$Builder;->setContentIntent(Landroid/app/PendingIntent;)Landroidx/core/app/NotificationCompat$Builder;

    .line 638
    invoke-virtual {v3, v2}, Landroidx/core/app/NotificationCompat$Builder;->setDeleteIntent(Landroid/app/PendingIntent;)Landroidx/core/app/NotificationCompat$Builder;

    const/4 v1, 0x1

    .line 640
    invoke-virtual {v3, v1}, Landroidx/core/app/NotificationCompat$Builder;->setAutoCancel(Z)Landroidx/core/app/NotificationCompat$Builder;

    .line 642
    invoke-virtual {p1}, Llt/farmis/libraries/notificationcontroller/data/models/BaseNotificationModel;->getAdjustedPriority()I

    move-result v1

    invoke-virtual {v3, v1}, Landroidx/core/app/NotificationCompat$Builder;->setPriority(I)Landroidx/core/app/NotificationCompat$Builder;

    .line 643
    invoke-virtual {p1}, Llt/farmis/libraries/notificationcontroller/data/models/BaseNotificationModel;->getVisibility()I

    move-result v1

    invoke-virtual {v3, v1}, Landroidx/core/app/NotificationCompat$Builder;->setVisibility(I)Landroidx/core/app/NotificationCompat$Builder;

    iget-object v1, p0, Llt/farmis/libraries/notificationcontroller/NotificationController;->mContext:Landroid/content/Context;

    .line 645
    invoke-interface {v0, v1}, Llt/farmis/libraries/notificationcontroller/data/configurations/NotificationConfiguration;->getTicker(Landroid/content/Context;)Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v3, v1}, Landroidx/core/app/NotificationCompat$Builder;->setTicker(Ljava/lang/CharSequence;)Landroidx/core/app/NotificationCompat$Builder;

    .line 647
    invoke-interface {v0}, Llt/farmis/libraries/notificationcontroller/data/configurations/NotificationConfiguration;->getSmallIcon()I

    move-result v1

    invoke-virtual {v3, v1}, Landroidx/core/app/NotificationCompat$Builder;->setSmallIcon(I)Landroidx/core/app/NotificationCompat$Builder;

    iget-object v1, p0, Llt/farmis/libraries/notificationcontroller/NotificationController;->mContext:Landroid/content/Context;

    .line 648
    invoke-interface {v0, v1}, Llt/farmis/libraries/notificationcontroller/data/configurations/NotificationConfiguration;->getLargeIcon(Landroid/content/Context;)Landroid/graphics/Bitmap;

    move-result-object v1

    invoke-virtual {v3, v1}, Landroidx/core/app/NotificationCompat$Builder;->setLargeIcon(Landroid/graphics/Bitmap;)Landroidx/core/app/NotificationCompat$Builder;

    iget-object v1, p0, Llt/farmis/libraries/notificationcontroller/NotificationController;->mContext:Landroid/content/Context;

    .line 650
    invoke-interface {v0, v1}, Llt/farmis/libraries/notificationcontroller/data/configurations/NotificationConfiguration;->getTitle(Landroid/content/Context;)Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v3, v1}, Landroidx/core/app/NotificationCompat$Builder;->setContentTitle(Ljava/lang/CharSequence;)Landroidx/core/app/NotificationCompat$Builder;

    iget-object v1, p0, Llt/farmis/libraries/notificationcontroller/NotificationController;->mContext:Landroid/content/Context;

    .line 651
    invoke-interface {v0, v1}, Llt/farmis/libraries/notificationcontroller/data/configurations/NotificationConfiguration;->getContent(Landroid/content/Context;)Ljava/lang/CharSequence;

    move-result-object v1

    invoke-virtual {v3, v1}, Landroidx/core/app/NotificationCompat$Builder;->setContentText(Ljava/lang/CharSequence;)Landroidx/core/app/NotificationCompat$Builder;

    .line 655
    invoke-virtual {p1}, Llt/farmis/libraries/notificationcontroller/data/models/BaseNotificationModel;->getWhen()J

    move-result-wide v1

    invoke-virtual {v3, v1, v2}, Landroidx/core/app/NotificationCompat$Builder;->setWhen(J)Landroidx/core/app/NotificationCompat$Builder;

    .line 657
    sget v1, Landroid/os/Build$VERSION;->SDK_INT:I

    const/16 v2, 0x1a

    if-lt v1, v2, :cond_0

    const-string v1, "ads_channel"

    .line 658
    invoke-virtual {v3, v1}, Landroidx/core/app/NotificationCompat$Builder;->setChannelId(Ljava/lang/String;)Landroidx/core/app/NotificationCompat$Builder;

    .line 662
    :cond_0
    sget v1, Landroid/os/Build$VERSION;->SDK_INT:I

    const/16 v2, 0x15

    if-lt v1, v2, :cond_1

    .line 663
    invoke-virtual {p1}, Llt/farmis/libraries/notificationcontroller/data/models/BaseNotificationModel;->getUsableGroupID()Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v3, v1}, Landroidx/core/app/NotificationCompat$Builder;->setGroup(Ljava/lang/String;)Landroidx/core/app/NotificationCompat$Builder;

    .line 667
    :cond_1
    iget-object v1, p0, Llt/farmis/libraries/notificationcontroller/NotificationController;->mContext:Landroid/content/Context;

    invoke-interface {v0, v1}, Llt/farmis/libraries/notificationcontroller/data/configurations/NotificationConfiguration;->getAdditionalNotificationStyle(Landroid/content/Context;)Landroidx/core/app/NotificationCompat$Style;

    move-result-object v0

    if-eqz v0, :cond_2

    .line 669
    invoke-virtual {v3, v0}, Landroidx/core/app/NotificationCompat$Builder;->setStyle(Landroidx/core/app/NotificationCompat$Style;)Landroidx/core/app/NotificationCompat$Builder;

    .line 673
    :cond_2
    invoke-virtual {p1}, Llt/farmis/libraries/notificationcontroller/data/models/BaseNotificationModel;->getURL()Ljava/lang/String;

    move-result-object v0

    invoke-static {v0}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v0

    if-nez v0, :cond_4

    .line 676
    new-instance v0, Landroid/content/Intent;

    invoke-virtual {p1}, Llt/farmis/libraries/notificationcontroller/data/models/BaseNotificationModel;->getURL()Ljava/lang/String;

    move-result-object v1

    invoke-static {v1}, Landroid/net/Uri;->parse(Ljava/lang/String;)Landroid/net/Uri;

    move-result-object v1

    const-string v2, "android.intent.action.VIEW"

    invoke-direct {v0, v2, v1}, Landroid/content/Intent;-><init>(Ljava/lang/String;Landroid/net/Uri;)V

    .line 677
    iget-object v1, p0, Llt/farmis/libraries/notificationcontroller/NotificationController;->mContext:Landroid/content/Context;

    const/4 v2, 0x0

    invoke-static {v1, v2, v0, v2}, Landroid/app/PendingIntent;->getActivity(Landroid/content/Context;ILandroid/content/Intent;I)Landroid/app/PendingIntent;

    move-result-object v0

    .line 680
    invoke-virtual {p1}, Llt/farmis/libraries/notificationcontroller/data/models/BaseNotificationModel;->getButtonLabel()Ljava/lang/String;

    move-result-object v1

    invoke-static {v1}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v1

    if-nez v1, :cond_3

    invoke-virtual {p1}, Llt/farmis/libraries/notificationcontroller/data/models/BaseNotificationModel;->getButtonLabel()Ljava/lang/String;

    move-result-object v1

    goto :goto_0

    :cond_3
    invoke-virtual {p1}, Llt/farmis/libraries/notificationcontroller/data/models/BaseNotificationModel;->getURL()Ljava/lang/String;

    move-result-object v1

    .line 682
    :goto_0
    sget v2, Llt/farmis/libraries/notificationcontroller/R$drawable;->ic_open_in_browser_white_36dp:I

    invoke-virtual {v3, v2, v1, v0}, Landroidx/core/app/NotificationCompat$Builder;->addAction(ILjava/lang/CharSequence;Landroid/app/PendingIntent;)Landroidx/core/app/NotificationCompat$Builder;

    .line 686
    :cond_4
    invoke-virtual {p0, v3, p1}, Llt/farmis/libraries/notificationcontroller/NotificationController;->provideDeliveryFeedback(Landroidx/core/app/NotificationCompat$Builder;Llt/farmis/libraries/notificationcontroller/data/models/BaseNotificationModel;)V

    .line 690
    invoke-virtual {v3}, Landroidx/core/app/NotificationCompat$Builder;->build()Landroid/app/Notification;

    move-result-object v0

    .line 691
    iget-object v1, p0, Llt/farmis/libraries/notificationcontroller/NotificationController;->mNotificationManager:Landroidx/core/app/NotificationManagerCompat;

    invoke-virtual {p1}, Llt/farmis/libraries/notificationcontroller/data/models/BaseNotificationModel;->getUsableID()I

    move-result p1

    invoke-virtual {v1, p1, v0}, Landroidx/core/app/NotificationManagerCompat;->notify(ILandroid/app/Notification;)V

    return-void
.end method

.method public useSettings(Llt/farmis/libraries/notificationcontroller/NotificationControllerSettings;)Llt/farmis/libraries/notificationcontroller/NotificationController;
    .locals 0

    .line 165
    iput-object p1, p0, Llt/farmis/libraries/notificationcontroller/NotificationController;->mSettings:Llt/farmis/libraries/notificationcontroller/NotificationControllerSettings;

    return-object p0
.end method
